import axios from 'axios';
import { loginreq,greq,preq } from './axiosFun';

/**
 * 基础资源
 */
// 获取系统版本信息
export const getVersion = () => { return greq("http://localhost:8080/sys/getversion") };
// 获取欢迎语
export const getWelcome = (params) => { return preq("post","http://localhost:8080/sys/getwelcome",params) };
// 获取当前系统仓库列表StroeItem
export const getStroeItem = () => { return greq("http://localhost:8080/store/getstoreitem") };
// 获取当前系统材料种类列表
export const getMaterialItem = () => { return greq("http://localhost:8080/material/getmaterialitem") };
// 获取当前登录人仓库内包含的材料列表
export const getMaterialItemByStoreid = (params) => { return preq("post","http://localhost:8080/material/getmaterialitembystoreid",params) };
// 获取当前登录人仓库内的仓库负责人
export const getUsersByStoreid = (params) => { return preq("post","http://localhost:8080/sys/getusersbystoreid",params) };
// 获取角色列表roleItem
export const getRoleItem= () => { return greq("http://localhost:8080/role/getroleitem") };
// 获取申请单状态列表stateItem
export const getStateItem = () => { return greq("http://localhost:8080/apply/getstateitem") };
// 获取当前用户可见的菜单列表Menus
export const getMenus = (params) => { return preq("post","http://localhost:8080/menu/getmenus",params) };
// 获取当前用户的系统公告Notices
export const getNotices = (params) => { return preq("post","http://localhost:8080/notice/getnotices",params) };
// 获取当前系统菜单权限列表Menulist
export const getMenulist = () => { return greq("http://localhost:8080/menu/getmenulist") };
/**
 * 登录 注册 邮箱验证
 */
// 登录接口
export const login = (params) => { return loginreq("post", "http://localhost:8080/login", params) };
// 注册接口
export const register = (params) => { return preq("post", "http://localhost:8080/register", params) };
// 验证账号并发送验证码
export const sendCode = (params) => { return preq("post", "http://localhost:8080/sendCode", params) };
